The present invention generally relates to databases and more specifically to apparatus and methods for capturing samples of session activity in a database.
Enterprise databases continue to grow in size and number resulting in increased systems management and administrative complexity. As the size and complexity of database systems increase, the likelihood that performance problems may result also increases. Analysis of the problems thus becomes an important task to properly maintain database systems.
As users connect to a database to request operations, sessions are assigned to the users. A database system may include many sessions that are performing operations in the system at any given time. A session activity log is useful in diagnosing any performance problems. The log typically includes full traces of all activity performed by a session. Capturing the log, however, is very expensive and prohibitively slows a database system down.
Also, because many sessions may be present in a database system over a period of time, it may not be feasible to capture a full trace of activity for all sessions in a database system. In some cases, capturing information may be considered too prohibitive and no information is collected. The activity may be captured using requests externally from the database system, such as SQL requests. This method is again costly and the information returned may not be reliable because the activity that may be causing the performance problem may not be recorded. In other cases, information for only a select number of sessions may be captured. Thus, when analyzing performance problems, a user may not have enough information on session activity to properly diagnose a performance problem.
Accordingly, methods and apparatus for efficiently capturing information for session activity in a database are needed.